﻿using System;
using System.Reflection;
using System.Windows.Shell;
using System.Windows;
using System.IO;

namespace HeritageAcademy.Shared
{
    public static class Taskbar
    {
        public static void AddToRecent(string destination)
        {
            JumpTask jumpTask = new JumpTask();
            jumpTask.Title = "Курс";
            jumpTask.ApplicationPath = destination;
            jumpTask.CustomCategory = "Недавние";
            jumpTask.IconResourcePath = @"C:\Windows\System32\imageres.dll";
            jumpTask.IconResourceIndex = 14;

            JumpList jumpList = JumpList.GetJumpList(Application.Current);
            jumpList.JumpItems.Add(jumpTask);
            jumpList.Apply();
        }
    }
}
